import com.bourre.structures.Range;
import com.kairos.utils.monitor.AbstractMonitorField;
import com.kairos.engine.RTEvent;

/**
 * @author Abe
 */
class com.kairos.utils.monitor.ArrayLengthField extends AbstractMonitorField {
	
	private var _arrayTarget : Array;
	
	public function ArrayLengthField(name : String, array : Array , unit : String, col : Number, r : Range )
	{
		super(name, array.length, unit, col, r);
		_arrayTarget = array;
	}
	 public function registerValue ( e : RTEvent ) : Void
	 {
	 	_nLastValue = _nValue;
	 	
	 	var n : Number = 0;
	 	for (var i: String in _arrayTarget )
	 		n++;
	 		
	 	_nValue = n;
	 }
}